/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Sess
 */

package Main;
import Interface.*;
import Process.*;
public class Hearts {

    /**
     * @param args the command line arguments
     */
    
    public MainMenu frameMainMenu;
    public JoinGame frameJoinGame;
    public ServerInterface frameServerInterface;
    public ClientInterface frameClientInterface;
    public String PlayerName;
    public String IP, Hostname;
    public ClientProcess CP;
    public ServerProcess SP;
    
    public Hearts() {
        
       ShowMainMenuFrame();
       
       
    }
    
    public void ShowMainMenuFrame()
    {
        if(frameMainMenu==null)
            frameMainMenu=new MainMenu(this);
        java.awt.Dimension screenSize=java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    	frameMainMenu.setLocation((screenSize.width-frameMainMenu.getSize().width)/2,(screenSize.height-frameMainMenu.getSize().height)/2);
    	frameMainMenu.setVisible(true);
    }

     public void ShowJoinGameFrame()
    {
           if(frameJoinGame==null)
            frameJoinGame=new JoinGame(this);
        java.awt.Dimension screenSize=java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    	frameJoinGame.setLocation((screenSize.width-frameJoinGame.getSize().width)/2,(screenSize.height-frameJoinGame.getSize().height)/3);
    	frameJoinGame.setVisible(true);
    }

     public void ShowServerInterfaceFrame()
    {
        if(frameServerInterface==null)
            frameServerInterface=new ServerInterface(this);
        java.awt.Dimension screenSize=java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    	frameServerInterface.setLocation((screenSize.width-frameServerInterface.getSize().width)/2,(screenSize.height-frameServerInterface.getSize().height)/3);
    	//frameServerInterface.setVisible(true);
     }

      public void ShowClientInterfaceFrame()
    {
        if(frameClientInterface==null)
            frameClientInterface=new ClientInterface(this);
        java.awt.Dimension screenSize=java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    	frameClientInterface.setLocation((screenSize.width-frameClientInterface.getSize().width)/2,(screenSize.height-frameClientInterface.getSize().height)/2);
    	//frameClientInterface.setVisible(true);
    }

    public static void main(String[] args) {
        // TODO code application logic here
        new Hearts();
    }

} 
